home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
tpdev.arc
/
TPDEV.DOC
< prev
next >
Wrap
Text File
|
1991-09-27
|
1KB
|
42 lines
They said it couldn't be done! (In fact, I think I was one of the naysayers...)
"TP can't create the special format of file that's needed for a device driver."
Wrong!!
I've written a simple device driver in TP, and it works. From some things I've
heard, it won't work in all versions of DOS (it's an .EXE format device driver,
not a .BIN format one). There are tons of restrictions on what you can do in it
- DOS isn't reentrant, and the TP system library isn't designed to do things
while DOS is active, so I don't even let it get initialized, etc., etc.
It's still a bit of a mess, but here it is, for your enjoyment and edification:
a character device driver that keeps a buffer of 255 characters, called
TPDEVICE.
To try it out, compile it (you'll need OPro or TPro; sorry, but stack swapping
is essential, and I wouldn't want to try to write code to do it myself), put it
into your CONFIG.SYS (on a floppy disk, please!) as
device=tpdev.exe
and then reboot. Hopefully you won't crash, but if you do, you'll have to
reboot from a different disk and remove it from CONFIG.SYS.
Then you can try
COPY TPDEVICE CON
to see the initialization message, and
ECHO This is a line for the buffer >TPDEVICE
to replace it with a new one.
Enjoy!!
Duncan Murdoch
May, 1991